<template>
	<view class="login-cont">
		<view class="login-form">
			<view class="header-li_in">
				<view class="header-name_in">
					<view class="title" style="margin-top: 5px;">个人简介:</view>
					<view class="interval_center_input">
						<u-input v-model="userInfo.userBriefIntroduction" style="margin-left: 14rpx;" type="textarea"
							placeholder="  请输入您的个人简介!" />
					</view>
				</view>
			</view>
		</view>
		<button class="login-btn" @click="handleConfirm()">确认修改</button>
	</view>
</template>

<script>
	let inter = null;
	export default {
		data() {
			return {
				userInfo: uni.getStorageSync('rawData'),
			};
		},
		methods: {
			//确认更换个人简介
			handleConfirm() {
				this.$request.api.introduction({
					user_id: this.userInfo.userId,
					user_brief_introduction: this.userInfo.userBriefIntroduction,
				}).then(res => {
					console.log(res, '11112222945545')
					if (res.data.code == 0) {
						uni.setStorageSync('rawData', res.data.data)

						uni.navigateBack({
							delta: 1
						});
					}

					uni.showToast({
						title: res.data.msg,
						duration: 2000,
						icon: 'success'
					});




				})
			},
		}
	};
</script>

<style lang="scss">
	.login-cont {
		background: #ffffff;
		min-height: 100vh;

		.login-form {
			// margin-top: 90rpx;
			border-top: 1rpx solid #eeeeee;
			font-size: 34rpx;
		}

		.login-btn {
			margin-top: 60rpx;
			width: 660rpx;
			height: 98rpx;
			background: #578ef0;
			box-shadow: 0px 4rpx 10rpx 0rpx rgba(87, 142, 240, 0.4);
			border-radius: 49rpx;
			font-size: 36rpx;
			line-break: 98rpx;
			color: #fff;
			text-align: center;
			background: linear-gradient(270deg, #87cefa 0%, #00bfff 53%, #578EF0 100%);
			;
		}

		.header-li_in {
			width: 100%;
			background-color: #FFFFFF;
			margin-top: 12rpx;
			padding-bottom: 20rpx;
		}

		.header-name_in {
			width: 90%;
			margin: 0 auto;
			padding-top: 2rpx;
			/* margin-left: 34rpx; */
		}

		.interval_center_input {
			height: 120rpx;
			margin-top: 12rpx;
			border-radius: 20rpx;
			border: 1rpx solid #DDDDDD;
		}

	}
</style>